package com.tarena.util;

/**
 * 
 * @author Wangpeihu
 * @since 31/12/2009
 */
public class StrToInt {

	/**
	 * 将字符串数组转换成Int类型的数组<br>
	 * 
	 * @param str
	 * @return
	 */
	public static int[] toInt(String[] str) {
		if (str != null && str.length > 0) {
			int[] numbers = new int[str.length];
			for (int i = 0; i < str.length; i++) {
				numbers[i] = Integer.parseInt(str[i]);
			}
			return numbers;
		}
		return null;
	}
}
